﻿using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace NewfarTormentTool.sub
{
    /// <summary>
    /// 关于面板
    /// </summary>
    public partial class About : Form
    {
        public About()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 打开浏览器
        /// </summary>
        /// <param name="url">网络地址</param>
        private static void OpenBrowser(string url)
        {
            Process.Start(new ProcessStartInfo(url) 
            { 
                UseShellExecute = true 
            });
        }

        /// <summary>
        /// 打开链接 - https://space.bilibili.com/9098985
        /// </summary>
        private void LL_BiliLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            OpenBrowser("https://space.bilibili.com/9098985");
        }

        /// <summary>
        /// 拷贝1972172324到剪切板
        /// </summary>
        private void LL_QQCopy_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Clipboard.SetText("1972172324");
            MessageBox.Show("QQ号已复制到剪切板!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        /// <summary>
        /// 打开链接 - https://live.bilibili.com/3735461
        /// </summary>
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            OpenBrowser("https://live.bilibili.com/3735461");
        }

        /// <summary>
        /// 隐藏界面
        /// </summary>
        private void Button_OK_Click(object sender, EventArgs e)
        {
            Hide();
        }
    }
}
